import { createApp, App } from 'vue'
import './style.css'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'

import { createPinia } from 'pinia'

import APP from './App.vue'

const pinia = createPinia()
const app = createApp(APP)

function useTable (app: App) {
	app.use(VXETable)
	// 给 vue 实例挂载VXETable内部对象
	app.config.globalProperties.$XModal = VXETable.modal
	app.config.globalProperties.$XPrint = VXETable.print
	app.config.globalProperties.$XSaveFile = VXETable.saveFile
	app.config.globalProperties.$XReadFile = VXETable.readFile
}

app.use(ElementPlus)
app.use(useTable)
app.use(pinia)
app.mount('#app')
